package com.yl.ydk.ui.activity

import android.content.Intent
import android.view.View
import com.yl.ydk.R
import com.yl.ydk.base.BaseActivity
import kotlinx.android.synthetic.main.activity_healthy_know.*
import kotlinx.android.synthetic.main.roob_bar.*

class HealthyKnowActivity : BaseActivity(), View.OnClickListener {


    override fun getLayoutId(): Int = R.layout.activity_healthy_know

    override fun attachView() {

    }

    override fun detachView() {

    }

    override fun initView() {
        tvTitle.text = "健康百科"
        rlBack.setOnClickListener(this)
        cvHealthyVideo.setOnClickListener(this)
        cvDiseaseCate.setOnClickListener(this)
        cvSiteArticle.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.rlBack -> {
                finish()
            }
            R.id.cvHealthyVideo -> {
                startActivityIn(Intent(this, HealthyVideoHomeActivity::class.java), this)
            }
            R.id.cvDiseaseCate -> {
                startActivityIn(Intent(this, DiseaseCateActivity::class.java), this)
            }
            R.id.cvSiteArticle -> {
                startActivityIn(Intent(this, SiteArticleActivity::class.java), this)
            }
        }
    }

}